Gravity is the force of attraction between any objects with mass. The equation for the gravitational force between two objects of mass M and m, and r is the distance between their centers of mass
where G is the gravitational constant .
The force due to gravity acts at the center of mass of the objects and is the same for both objects in question.